let stack1 = []; // 栈
let stack2 = [];
let queue = []; // 队列
let arr = [1, 2, 3, 4, 5, 6, 7, 8, 9];
for (let i = 0; i < arr.length; i++) {
  stack1.push(arr[i]);
}
while (stack1.length) {
  stack2.push(stack1.pop());
}
console.log(stack2);
